
document.observe('dom:loaded', function() {
new Ajax.Autocompleter('state_input_city', 'suggestions_city','city.jsp',
{afterUpdateElement : getSelectionId, callback: function(element, entry) 
{ return entry + '&state_input_country=' + document.getElementById('state_input_country').value; }});
});

function getSelectionId(element, selectedElement) {
     document.getElementById("state_input_country").value = selectedElement.id;
}

document.observe('dom:loaded', function() {
new Ajax.Autocompleter('state_input_country', 'suggestions_country','country.jsp',
{callback: function(element, entry) { return entry + '&state_input_city=' + document.getElementById('state_input_city').value; }});
});
